package Text;

import java.util.List;

import com.project.entity.ProjectInfo;
import com.project.page.Page;
import com.project.service.ProjectInfoService;
import com.project.service.Impl.ProjectInfoServiceImpl;

public class TextQuery {
	public static void main(String[] args) {
		ProjectInfoService impl = new ProjectInfoServiceImpl();
		//查询全部
		/*List<ProjectInfo> pros = impl.query();
		for(ProjectInfo pro:pros) {
			System.out.println(pro);
		}*/
		//按条件查询
		/*ProjectInfo pro = new ProjectInfo();
		pro.setId(2);
		List<ProjectInfo> pros = impl.querytj(pro);
		for(ProjectInfo pro1:pros) {
			System.out.println(pro1);
		}*/
		Page page = new Page(1, 3, impl.getTotalCount());
		System.out.println(page.getStartRow());
		List<ProjectInfo> pros = impl.qureyAllByPage(page);
		for(ProjectInfo pro1:pros) {
			System.out.println(pro1);
		}
		System.out.println(impl.getTotalCount());
	}

}
